package com.marketmachine.android.br;

import android.os.Parcel;
import android.os.Parcelable;
import java.util.*;

public class CollectionWrapper implements Parcelable {
	private List <String> coll;
	public static final Parcelable.Creator<CollectionWrapper> CREATOR = new Parcelable.Creator<CollectionWrapper>() {
		public CollectionWrapper createFromParcel(Parcel in) {
			return new CollectionWrapper(in);
		}

		public CollectionWrapper[] newArray(int size) {
			return new CollectionWrapper[size];
		}
	};
	@Override
	public void writeToParcel(Parcel arg0) {
		// TODO Auto-generated method stub
		arg0.writeList(coll);

	}

	public CollectionWrapper (List <String> init){
		coll = init;
	}

	private CollectionWrapper (Parcel in){
		readFromParcel(in);
	}

	public void readFromParcel(Parcel in) {
		coll = (ArrayList<String>) in.readArrayList(ClassLoader.getSystemClassLoader());

	}
	
	public List<String> getList (){
		return coll;
	}


}
